package org.zpmis.domain.role.service.impl;

import org.apache.commons.collections.map.HashedMap;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.transaction.annotation.Transactional;
import org.zpmis.domain.role.model.SysPermission;
import org.zpmis.domain.role.service.GatewayApiService;
import org.zpmis.domain.role.service.SysPermissionService;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class GatewayApiServiceImpl implements GatewayApiService {

    @Resource
    private SysPermissionService sysPermissionService;
    @Override
    public List<SysPermission> getPermissionListByUri(String uri) {
        Map<String,Object> param = new HashedMap();
        param.put("apiUrl",uri);
        param.put("isDeleted",0);
        return sysPermissionService.findByConditionMap(param);
    }
}
